/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package common.Objects;

import java.util.Vector;

/**
 *
 * @author Richard Irons
 */
public class Product {
    private int id;
    private String name;
    private String description;
    private Vector<Component> components;
    private double price;

    public Product() {
        this.id = -1;
        this.name = "";
        this.description = "";
        this.components = new Vector<Component>();
        this.price = 0.0;
    }

    @Override
    public String toString() {
        if (id > -1) {
            return "ID:"
                + this.id
                + ", Name:"
                + this.name;
        } else {
            return "";
        }
    }

    public Vector<Component> getComponents() {
        return components;
    }

    public void setComponents(Vector<Component> components) {
        this.components = components;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
